package lab01;

public class Test11 {
    public static void main(String[] args) {
        int i = 2;
        int count = 1;
        System.out.print(i + " ");
        for (i = 3; i <= 100; i = i + 2) {
            boolean f = true;
            for (int j = 2; j < i; j++) {
                if (i % j == 0) {
                    f = false;
                    break;
                }
            }
            if (f) {
                System.out.print(i + " ");
                count++;
                if (count % 5 == 0) {
                    System.out.println();
                }
            }
        }
    }
}
